package com.ucampus.dao;

import com.ucampus.entity.news;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface newsMapper {
    // 获取全部新闻信息
    @Select("SELECT * FROM content")
    List<news> getAllNews();

    // 根据ID获取新闻信息
    @Select("SELECT * FROM content WHERE id = #{id}")
    news getNewsById(int id);
}
